/**
 * WebController.h by Giraldo Rosales.
 * Visit www.liquidgear.net for documentation and updates.
 *
 * Copyright (c) 2009 Nitrogen Design, Inc. All rights reserved.
 * 
 * Permission is hereby granted, free of charge, to any person
 * obtaining a copy of this software and associated documentation
 * files (the "Software"), to deal in the Software without
 * restriction, including without limitation the rights to use,
 * copy, modify, merge, publish, distribute, sublicense, and/or sell
 * copies of the Software, and to permit persons to whom the
 * Software is furnished to do so, subject to the following
 * conditions:
 * 
 * The above copyright notice and this permission notice shall be
 * included in all copies or substantial portions of the Software.
 * 
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
 * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
 * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
 * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
 * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
 * OTHER DEALINGS IN THE SOFTWARE.
 **/

#if LG_USE_ACCELERATION
@class Accelerometer;
#endif

#if LG_USE_ADMOB
@class AdMob;
#endif

#if LG_USE_DATABASE
@class Database;
#endif

#if LG_USE_EMAIL
@class Email;
#endif

#if LG_USE_IMAGE
@class Image;
#endif

#if LG_USE_LOCATION
@class Location;
#endif

#if LG_USE_NAVBAR
@class NavBar;
#endif

#if LG_USE_SOUND
@class Sound;
#endif

#if LG_USE_TABBAR
@class TabBar;
#endif

@class Utils;

@interface WebController : UIViewController<UIWebViewDelegate> {
	UIWebView *webView;
	UIImageView *imageView;
	UIActivityIndicatorView *activityView;
	NSURL *appURL;
	
#if LG_USE_ACCELERATION
	Accelerometer *accelerometer;
#endif
	
#if LG_USE_ADMOB
	AdMob *admob;
#endif
	
#if LG_USE_DATABASE
	Database *db;
#endif
	
#if LG_USE_EMAIL
	Email *mail;
#endif

#if LG_USE_IMAGE
	Image *image;
#endif
	
#if LG_USE_LOCATION
	Location *location;
#endif
	
#if LG_USE_NAVBAR
	NavBar *navBar;
#endif
	
#if LG_USE_SOUND
	Sound	*sound;
#endif

#if LG_USE_TABBAR
	TabBar *tabs;
#endif
	
#if LG_USE_YOUTUBE
	UIWebView *ytView;
#endif
}

@property (nonatomic, retain) UIWebView *webView;
@property (nonatomic, retain) UIImageView *imageView;
@property (nonatomic, retain) NSURL *appURL;

#if LG_USE_ACCELERATION
@property (nonatomic, retain) Accelerometer *accelerometer;
#endif

#if LG_USE_ADMOB
@property (nonatomic, retain) AdMob *admob;
#endif

#if LG_USE_DATABASE
@property (nonatomic, retain) Database *db;
#endif

#if LG_USE_EMAIL
@property (nonatomic, retain) Email *mail;
#endif

#if LG_USE_IMAGE
@property (nonatomic, retain) Image *image;
#endif

#if LG_USE_LOCATION
@property (nonatomic, retain) Location *location;
#endif

#if LG_USE_NAVBAR
@property (nonatomic, retain) NavBar *navBar;
#endif

#if LG_USE_SOUND
@property (nonatomic, retain) Sound *sound;
#endif

#if LG_USE_TABBAR
@property (nonatomic, retain) TabBar *tabs;
#endif

#if LG_USE_YOUTUBE
@property (nonatomic, retain) UIWebView *ytView;
#endif

- (id)init:(CGRect)rect;
- (void)loadView;
- (void)nextCall;
- (void)resizeValue;
- (void)startThrobber;
- (void)stopThrobber;

#ifdef LG_DEBUG
- (void) startJSLogger;
- (void) readJSLogger;
#endif

@end
